//
//  WHRNetwork.m
//  AnXin100
//
//  Created by 天质弘耕 on 2018/11/28.
//  Copyright © 2018 tzhg. All rights reserved.
//

#import "WHRNetwork.h"

@implementation WHRNetwork


+ (MBProgressHUD *)showNetworkErrorHudAtView:(UIView *)view {
    return [self showHudAtView:view message:@"连接网络失败，请检查网络！" isTextOnly:YES];
}

+ (MBProgressHUD *)showHudAtView:(UIView *)view message:(NSString *)msg isTextOnly:(BOOL)isTextOnly{
    if (!view) {
        return nil;
    }
    MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:view animated:YES];
    if (isTextOnly) {
        hud.mode = MBProgressHUDModeText;
        [hud hideAnimated:YES afterDelay:1.3];
    }
    hud.detailsLabel.text = msg;
    hud.detailsLabel.font = [UIFont systemFontOfSize:16];
    return hud;
}



@end
